from __future__ import print_function

from datetime import datetime
import pyautogui

while True:
    # pyautogui.hotkey('ctrl', 'a')
    # pyautogui.keyDown('shift')
    pyautogui.keyDown('a')
    now = datetime.now()  # current date and time
    time = now.strftime("%H:%M:%S")
    print(time)
    print(type(time))
    if(time == "17:51:30"):
        break